23. Making Hashed Cookies
Making Hashed Cookies
Question:
Start Quiz:
import hashlib
def hash_str(s):
return hashlib.md5(s).hexdigest()
# -----------------
# User Instructions
#
# Implement the function make_secure_val, which takes a string and returns a
# string of the format:
# s,HASH
def make_secure_val(s):
User's Answer:
(Note: The answer done by the user is not guaranteed to be correct)
import hashlib
def hash_str(s):
return hashlib.md5(s).hexdigest()
# -----------------
# User Instructions
#
# Implement the function make_secure_val, which takes a string and returns a
# string of the format:
# s,HASH
def make_secure_val(s):
return s + "," + hash_str(s)
print make_secure_val("test")